package com.ys.lambda;

import org.junit.Test;

/**
 * <p>@description:</p>
 *
 * @author shuangyang
 * @version 1.0
 * @date 18-2-1 下午7:57
 */
public class TestJobFunction {

    @Test
    public void stream() {

        User user = new User();
        user.setName("杨爽");
        //使用lambada表达式 代码更简洁
        System.out.println(testJobFunction(() -> user.getName().equals("杨爽")));
    }


    private boolean testJobFunction(JobFunction jobFunction) {
        return jobFunction.execute();
    }
}
